package com.project.service;

import com.spring.*;

@Component("userService")
@Scope("singleton")
public class UserService implements BeanNameAware, InitializingBean {

    @Autowired
    private OrderService orderService;


    private String name;

    public void setName(String name) {
        this.name = name;
    }

    private String beanName;

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
        System.err.println("setBeanName...");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.err.println("Initializing...");
    }

    public void test() {
        System.out.println(orderService);
    }


}
